package com.zlf.sb.demo.controller;

import com.zlf.sb.demo.design.zh.AwardStrategyFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/***
 *@title ActivityController
 *@description <TODO description class purpose>
 *@author wgc_j
 *@version 1.0.0
 *@create 2025-02-19 10:41
 **/
@RestController
@RequestMapping("/activity")
public class ActivityController {
@Autowired
private AwardStrategyFactory awardStrategyFactory;
    @PostMapping("/reward3")
    public void reward3(String userId, String source) {
        AwardStrategyFactory.getInstance().getAwardResult(userId, source);
    }
    @PostMapping("/reward4")
    public void reward4(String userId, String source) {
        AwardStrategyFactory instance = awardStrategyFactory.getInstance();
        System.out.println("instance = " + instance);
        Boolean awardResult = instance.getInstance().getAwardResult(userId, source);
        System.out.println("awardResult = " + awardResult);
    }
}

